package com.shunwang.errors.engine.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.shunwang.errors.engine.builder.annotation.LoggerHandler;

public class AnnotationUtil {

	public static Annotation[] getAnnotationClass(Class clazz) throws ClassNotFoundException{
		return clazz.getAnnotations();
	}
	
	public static Annotation getAnnotationClass(Class clazz,Class annotationClass){
		return clazz.getAnnotation(annotationClass);
	}
	
	public static Annotation[] getAnnotationMethod(Method method){
		return method.getAnnotations();
	}
	
	public static Annotation getAnnotationMethod(Method method,Class annotationClass){
		return method.getAnnotation(annotationClass);
	}
	
}
